import request from '@/utils/request'

export function login(username, password) {
  return request({
    // url: '/vue-admin-template/user/login',
    url: '/api-auth/oauth/user/token',
    headers: {
      'client_id': 'jeecp',
      'client_secret': 'webApp'
    },
    method: 'post',
    data: { 'username': username, 'password': password }
  })
}

export function getInfo() {
  return request({
    url: '/api-auth/oauth/userinfo',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

export function current() {
  return request({
    url: '/api-user/menus/current2',
    method: 'get'
  })
}
